{% extends "layouts/application.html" %}
{% block content %}

<script type="text/javascript">
	function pageselectCallback(page_id, jq){
		//alert(page_id)
		window.location.href="?page="+(page_id+1);
    }
    $(document).ready(function(){
		// Create pagination element
        $("#Pagination").pagination({{objects.paginator.count}}, {
			num_edge_entries: 2,
			num_display_entries: 8,
			current_page:({{objects.number}}-1),
            callback: pageselectCallback
        });
    });
    function to_thumb1(id){
    	window.location.href="../show_files_pic/ca_"+id+"type_0";
    }
    function to_thumb2(id){
    	window.location.href="../show_files_pic/ca_"+id+"type_1";
    }
</script>
<div align="center">
  <DIV class=boxright>
    <DIV class=bltop2>
      <div align="left">&nbsp;&nbsp;&nbsp;
        <strong>
          当前位置：&nbsp;&nbsp;
          <a href="/{%site_root%}/resource/show_resource/">资料库</a>
          <img src="/site_media/images/zd_arrow.gif">&nbsp;&nbsp;
          <a href="/{%site_root%}/resource/show_leveltwo_resource/{{obj.parentId.id}}">{{obj.parentId.name}}</a>
          <img src="/site_media/images/zd_arrow.gif">&nbsp;&nbsp;
          <a href="{{obj.get_files_url}}">{{obj}} [缩]</a>
          <span style="margin-left:100px;">

          	<a href="javascript:to_thumb1({{obj.id}})"><img border="0" src="/site_media/images/all_pic.png"/></a> 显示全部缩略图
          	<a href="javascript:to_thumb2({{obj.id}})"><img border="0" src="/site_media/images/some_pic.png"/></a>只显示缩略图
          </span>
        </strong>
      </div>
    </DIV>
    <div class="picBox">
	    	<ul>
	    		{% if objects.object_list %}
              	{% for file in objects.object_list %}
		    	<li>
		    		<a href="{{file.getFile}}">
		    		<img src='{{file.getThumb}}' height="120" width="120" border="0">
		    		<div align="center">{{file.name}}</div></a>
		    	</li>
		    	{% endfor %}
              	{% endif %}
	    	</ul>
    	</div>
    <DIV class=c_box>
	<div id="Pagination" class="pagination">
    </DIV>
  </DIV>
  </DIV>
</div>

{% endblock %}